/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Administrator
 */
public class XoayDoc {
        public static void Xoay(PixelAnh pix) {
        Pixel[][] data = pix.getData();

        for (int dong = 0; dong < pix.getHeight() / 2; dong++) {
            for (int cot = 0; cot < pix.getWidth(); cot++) {
                Pixel temp = data[dong][cot];
                data[dong][cot] = data[pix.getHeight() - dong - 1][cot];
                data[pix.getHeight() - dong - 1][cot] = temp;
            }
        }

        pix.setData(data);
    }

}
